package action.articleclass;

import service.ArticleClassService;
import bean.ArticleClass;

import com.opensymphony.xwork2.ActionSupport;

public class ModifyArticleClassAction extends ActionSupport {
	private ArticleClass articleClass;
	private ArticleClassService articleClassService;
	
	@Override
	public String execute() throws Exception {
		ArticleClass ac=articleClassService.getArticleClassById(articleClass.getId());
		ac.setTitle(articleClass.getTitle());
		if(articleClassService.modifyArticleClass(ac))
			return SUCCESS;
		return INPUT;
		
	}

	public ArticleClass getArticleClass() {
		return articleClass;
	}

	public void setArticleClass(ArticleClass articleClass) {
		this.articleClass = articleClass;
	}

	public ArticleClassService getArticleClassService() {
		return articleClassService;
	}

	public void setArticleClassService(ArticleClassService articleClassService) {
		this.articleClassService = articleClassService;
	}
	
	
}
